removed gl .c files
[EroBeats.git] / Djinn and Tonic - Erobeats / FileIO.h
blobce4f4fd11840c9f8a0cd8c165e0e7acf3021b8bc
1 #pragma once
3 #include<string>
4 #include <sstream>
5 #include <iostream>
6 #include <fstream>
7 #include<vector>
8 #include<array>
10 #include <SDL\SDL.h>
11 #include <SDL Image\sdl_image.h>
13 #include "unzip.h"
14 #include <ZLIB\zlib.h>
16 #include "ResourceMaster.h"
18 class FileIO
20 public:
22 FileIO(ResourceMaster* rsc);
23 FileIO(FileIO* fio);
24 FileIO();
25 ~FileIO();
27 ResourceMaster* rsc;
29 void storeGameText(std::vector<std::string> item);
32 void storeTextures(std::vector<SDL_Texture*> item);
33 void storeAnimations(std::vector<std::vector<SDL_Texture*>> item);
36 void saveUserData(int data, int line);
37 void saveScoreData(int gamemode, int data, int line);
39 int loadUserData(int line);
40 int loadScoreData(int gamemode, int line);
41 std::vector<std::string>loadLanguage(std::string path);
44 //Lazy
45 /*void loadMenuItems();
46 void loadMenuAnimations();
47 void loadGameGraphics();
48 void loadGameAnimations();*/
50 //Complex
51 SDL_Texture* loadSpecificImage(std::string path, int image);
52 std::vector<SDL_Texture*> loadSpecificZip(std::string path);
53 void loadBGZip();
54 void loadTexturesZip();
55 void loadAnimationsZip();
56 void loadAnimationsZipUntil(int number);
57 void loadAnimationsZipPast(int number);
58 void loadAnimationsZipInterval(int start, int end);
59 void loadSFXZip();
60 void loadBGMZip();
62 char* getZipFileName(unz_file_info ufi, unzFile uf);
64 void eraseUserData();
66 std::vector<std::string> split(std::string str, char delimiter);
67 std::vector<int> splitInt(std::string str, char delimiter);
69 //SDL_Texture* extractSpecificTexture(std::string path, int image);
70 private:
71 //SDL_Texture* loadTexture(std::string path);
72 SDL_Texture* extractSpecificTexture(std::string path, int image);
73 std::vector<SDL_Texture*> extractTexturesFromZip(std::string path);
74 std::vector<Mix_Chunk*> extractSFXZip(std::string path);
75 std::vector<Mix_Music*> extractBGMZip(std::string path);
77 char* password;